<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>热线视频首页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all">
    <script th:src="@{/layui/layui.js}" charset="utf-8"></script>
    <script th:src="@{/js/jquery-2.2.3.min.js}" charset="utf-8"></script>

    <link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>

    <script>


        function change(title) {
            console.log(title)
            var url = "";
            switch (title) {

                // case  "总":
                //     url = "/videomanagement/video";
                //     break;
                case  "新建工单":
                    url = "/support/create";
                    break;
                case  "我的工单":
                    url = "/support/mychart";
                    break;

                case  "待审工单":
                    url = "/support/waitchartlist";
                    break;
                case  "在途工单":
                    url = "/support/workchartlist";
                    break;
                case  "知识库管理":
                    url = "/support/knowledgelist";
                    break;
                case  "员工论坛":
                    url = "/support/forumlist";
                    break;
                case  "用户管理":
                    url = "/support/userlist";
                    break;
                // default:
                //     url = "/videomanagement/videolist/" + title;
                //     break;
            }
            $("iframe").attr('src', url);

        }


    </script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">上海热线维保综合支撑平台</div>
        <ul class="layui-nav layui-layout-left">
<!--            <li class="layui-nav-item"><a href="">控制台</a></li>-->
<!--            <li class="layui-nav-item"><a href="">商品管理</a></li>-->
<!--            <li class="layui-nav-item"><a href="">用户管理</a></li>-->
<!--            <li class="layui-nav-item">-->
<!--                <a href="javascript:;">日常</a>-->
<!--                <dl class="layui-nav-child">-->
<!--                    <dd><a href="">邮件管理</a></dd>-->
<!--                    <dd><a href="">消息管理</a></dd>-->
<!--                    <dd><a href="">授权管理</a></dd>-->
<!--                </dl>-->
<!--            </li>-->
        </ul>
        <ul class="layui-nav layui-layout-right">
<!--            <li class="layui-nav-item">-->
<!--&lt;!&ndash;                <a href="javascript:;" th:text="张三">&ndash;&gt;-->
<!--&lt;!&ndash;                    <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"&ndash;&gt;-->
<!--&lt;!&ndash;                         class="layui-nav-img">&ndash;&gt;-->
<!--&lt;!&ndash;                </a>&ndash;&gt;-->
<!--&lt;!&ndash;                <dl class="layui-nav-child">&ndash;&gt;-->
<!--&lt;!&ndash;                    <dd><a href="">基本资料</a></dd>&ndash;&gt;-->
<!--&lt;!&ndash;                    <dd><a href="">安全设置</a></dd>&ndash;&gt;-->
<!--&lt;!&ndash;                </dl>&ndash;&gt;-->
<!--            </li>-->
<!--            <li class="layui-nav-item"><a href="">退出</a></li>-->
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;" >保障管理</a>

                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" onclick="change('新建工单')">新建工单</a></dd>
                        <dd><a href="javascript:;" onclick="change('我的工单')">我的工单</a></dd>
                        <dd><a href="javascript:;" onclick="change('待审工单')">待审工单</a></dd>
                        <dd><a href="javascript:;" onclick="change('在途工单')">在途工单</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;" >员工管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" onclick="change('知识库管理')">知识库管理</a></dd>
                        <dd><a href="javascript:;" onclick="change('员工论坛')">员工论坛</a></dd>
                    </dl>

                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">账户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" onclick="change('用户管理')">用户管理</a></dd>

                    </dl>

                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body">
<!--         内容主体区域 -->
                <iframe src="/support/create" frameborder="0" id="demoAdmin" style="width: 100%; height: 600px;"></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->

    </div>
</div>

<script>
    //JavaScript代码区域
    layui.use(['element', 'jquery'], function () {
        var element = layui.element, $ = layui.jquery;
        $(".menu_three").on("click", function () {
            $(this).next().toggle();
            $.each($(this).parent().siblings(), function (i, e) {
                $(e).find("ol").hide();
                ;
            });
        })
        $("ol").on("click", "li a", function () {
            $.each($(this).parent().siblings(), function (i, e) {
                $(e).find("a").removeClass('three_this')
            });
            $(this).addClass('three_this'); // 添加当前元素的样式
        })
    });


</script>
</body>
</html>